<!DOCTYPE html>
<html>
<head>
	<title>{% block title %}App Hackathon{% endblock %}</title>
	<script>
		function findOS(){
			var OSName;
			if (navigator.appVersion.indexOf("Win")!=-1)
				 OSName="Windows";
			if (navigator.appVersion.indexOf("Mac")!=-1)
				 OSName="MacOS";
			if (navigator.appVersion.indexOf("X11")!=-1) 
				OSName="UNIX";
			if (navigator.appVersion.indexOf("Linux")!=-1) 
				OSName="Linux";
			if (navigator.appVersion.indexOf("iPhone")!=-1)
				OSName="iPhone";
			if (navigator.appVersion.indexOf("iPod")!=-1)
				OSName="iPod";
			if (navigator.appVersion.indexOf("Android Mobile")!=-1)
				OSName="Android Mobile";
			return OSName;
		}
		var OSName = findOS();
		if ( OSName == 'iPhone' || OSName =='iPod' || OSName =='Android Mobile') {
			document.write('<link rel="stylesheet" type="text/css" href="/static/mobile.css" >');
			document.write('<meta name="viewport" content="width=320;" />');
		}
		else {
			document.write('<link rel="stylesheet" type="text/css" href="/static/main.css" >');
		}
	</script>
</head>
<body>
	<header>
		<p class=pTtl>
		<img src="/static/greyback.png" width="35px" height="28px" />
		App-Hackathon
		
		<script>
			var OSName = findOS();
		    if ( OSName == 'iPhone' || OSName =='iPod' || OSName =='Android Mobile') {
				document.write('</p></header>');
				document.write('<a href="{{ login_url }}" style="float:right; color:"#ffffff";><font color="FFFFFF">{{ login_text }}</font></a>');
		    }
		    else {
				document.write('<a href="{{ login_url }}" style="float:right; color:"#ffffff";><font color="FFFFFF">{{ login_text }}</font></a>');
				document.write('</p></header>');
		    }
		</script>
	<hr color="FF8800">     
	<nav id="navBtn">
		<ul>
			<li><a href='/projects'>Projects</a></li>
			<li><a href='/ideas'>Ideas</a></li>
			<li><a href='/groups'>Groups</a></li>
			<li><a href='/vote'>Vote</a></li>
			<li><a href='/tutorial'>Tutorials</a></li>
			<li><a href='/about'>About</a></li>
			<li><a href='/faq'>FAQ</a></li>
		</ul>
	</nav>
	<hr color="FF8800">
	<div id="messages">
	<ul>
		{% for msg in messages %}
		<li>{{ msg }}</li>
		{% endfor %}
	</ul>
	</div>
	<div id="content">{% block content %}{% endblock %}</div>
</body>
</html> 
